package com.optimize1;

/**
 * Time    : 2023/3/22 15:30
 * Author  : 王摇摆
 * FileName: WaterVehicle.java
 * Software: IntelliJ IDEA 2020.2.2
 * Blog    ：https://blog.csdn.net/weixin_44943389?type=blog
 */

public class WaterVehicle {
    private String name;
    public WaterVehicle(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void run(){
        System.out.println(this.getName()+"可以在水上行驶！");
    }

}
